home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Display Manager / Display Manager Sample Code / DisplayVideo / DisplayVideo.h < prev    next >
Encoding:
Text File  |  1997-06-24  |  2.3 KB  |  62 lines  |  [TEXT/CWIE]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    MacOS™ Sample Code
  4. #    
  5. #    Written by: Eric Anderson
  6. #     email: eric3@apple.com
  7. #
  8. #    Display Manager sample code
  9. #
  10. #    DisplayVideo
  11. #
  12. #    DisplayVideo.h    -    C Header
  13. #
  14. #    Copyright © 1995 Apple Computer, Inc.
  15. #    All rights reserved.
  16. #
  17. #    Revision History:
  18. #
  19. #    5/24/95        ewa        New today.
  20. #
  21. #
  22. #
  23. #    Components:    DisplayVideo.c            
  24. #
  25. #    For information on the use of this sample code, please the documentation in the Read Me file
  26. ------------------------------------------------------------------------------*/
  27.  
  28. // requestFlags bit values in VideoRequestRec (example use: 1<<kAbsoluteRequestBit)
  29. enum {
  30.     kBitDepthPriorityBit        = 0,    // Bit depth setting has priority over resolution
  31.     kAbsoluteRequestBit            = 1,    // Available setting must match request
  32.     kShallowDepthBit            = 2,    // Match bit depth less than or equal to request
  33.     kMaximizeResBit                = 3,    // Match screen resolution greater than or equal to request
  34.     kAllValidModesBit            = 4        // Match display with valid timing modes (may include modes which are not marked as safe)
  35. };
  36.  
  37. // availFlags bit values in VideoRequestRec (example use: 1<<kModeValidNotSafeBit)
  38. enum {
  39.     kModeValidNotSafeBit        = 0        //  Available timing mode is valid but not safe (requires user confirmation of switch)
  40. };
  41.  
  42. // video request structure
  43. struct VideoRequestRec    {
  44.     GDHandle        screenDevice;        // <in/out>    nil will force search of best device, otherwise search this device only
  45.     short            reqBitDepth;        // <in>        requested bit depth
  46.     short            availBitDepth;        // <out>    available bit depth
  47.     unsigned long    reqHorizontal;        // <in>        requested horizontal resolution
  48.     unsigned long    reqVertical;        // <in>        requested vertical resolution
  49.     unsigned long    availHorizontal;    // <out>    available horizontal resolution
  50.     unsigned long    availVertical;        // <out>    available vertical resolution
  51.     unsigned long    requestFlags;        // <in>        request flags
  52.     unsigned long    availFlags;            // <out>    available mode flags
  53.     unsigned long    displayMode;        // <out>    mode used to set the screen resolution
  54.     unsigned long    depthMode;            // <out>    mode used to set the depth
  55.     VDSwitchInfoRec    switchInfo;            // <out>    DM2.0 uses this rather than displayMode/depthMode combo
  56. };
  57. typedef struct VideoRequestRec VideoRequestRec;
  58. typedef struct VideoRequestRec *VideoRequestRecPtr;
  59.  
  60. // Routine defines
  61.  
  62.